import request from '@/utils/request';

let baseURL = '/property-portal/v1/api/tLicense';

// 证照项目列表
export const licenseProjectListApi = params => {
	return request({
		url: `${baseURL}/queryProjectLicenseList`,
		method: 'post',
		data: params,
	});
};

// 证照-新增--------------------------------------------------------------------证照----------------------------------------------------------------------
export const licenseAddApi = params => {
	return request({
		url: `${baseURL}/createLicense`,
		method: 'post',
		data: params,
	});
};

// 证照-更新
export const licenseUpdateApi = params => {
	return request({
		url: `${baseURL}/updateLicense`,
		method: 'post',
		data: params,
	});
};

// 证照-详情
export const licenseInfoApi = params => {
	return request({
		url: `${baseURL}/findLicenseViewById`,
		method: 'post',
		data: params,
	});
};

// 证照-列表
export const licenseListApi = params => {
	return request({
		url: `${baseURL}/queryLicenseList`,
		method: 'post',
		data: params,
	});
};

// 证照-附件
export const licenseFileApi = params => {
	return request({
		url: `${baseURL}/queryLicenseAttachmentList`,
		method: 'post',
		data: params,
	});
};

// 证照-导出
export const licenseExportApi = params => {
	return request({
		url: `${baseURL}/exportLicense`,
		method: 'post',
		data: params,
        responseType: 'blob'
	});
};

// 证照-导入
export const licenseImportApi = params => {
	return request({
		url: `${baseURL}/importLicense`,
		method: 'post',
		data: params,
	});
};

// 证照配置-新增--------------------------------------------------------------------证照配置----------------------------------------------------------------------
export const licenseSettingAddApi = params => {
	return request({
		url: `${baseURL}/saveLicenseConfig`,
		method: 'post',
		data: params,
	});
};

// 证照配置-详情
export const licenseSettingInfoApi = params => {
	return request({
		url: `${baseURL}/findLicenseConfigViewById`,
		method: 'post',
		data: params,
	});
};

// 失效负责人 | 年审通知人 数据源
export const notifierListApi = params => {
	return request({
		url: `${baseURL}/queryLicenseRoleList`,
		method: 'post',
		data: params,
	});
};
